1. Field of the Invention
The present invention generally relates to an information processing apparatus, method and program, and more particularly to an information processing apparatus, method and program, capable of processing information with a reduced time for starting up an operating system.
This application claims the priority of the Japanese Patent Application No. 2003-002119 filed on Jan. 8, 2003, the entirety of which is incorporated by reference herein.
2. Description of the Related Art
To start up kernels of an operating system (will be referred to simply as “OS” hereunder) having a definite device-driver framework such as the UNIX (registered trademark) OS or the like, the input-output (I/O) is initialized by referring to a table having initialization functions pre-registered therein in a dependency-relation sequence or the like and executing the initialization functions sequentially with a small number of threads.
Referring now to FIG. 1, there is schematically illustrated an example of the conventional I/O initialization. In the I/O initialization, generally indicated with a reference number 1, the threads are first locked in LOCK 2 and an Initialization 3 is done for use of the threads. Then, an I/O (input-output) Initialization 4 is done for sequentially calling and doing individual I/O Initializations 6. In the I/O Initialization 4, the individual I/O Initializations 6 are done in their registered sequence with reference to a predetermined Table 5 having an initialization method registered therein for each I/O.
Upon completion of the I/O Initialization 4, the threads are unlocked in UNLOCK 7, and then File System Mount 8 and Init File Execution (Exec/sbin/init) 9 are performed.
Alternatively, the I/O initializations may be performed after the OS startup proceeds until a plurality of threads is ready for use for parallel processing, for example.
FIG. 2 explains another example of the conventional I/O initialization. In this conventional I/O initialization, generally indicated with a reference number 11, the threads are locked in LOCK 12, an Initialization 13 is done for use of the threads, and then the threads are unlocked in UNLOCK 14.
When a plurality of threads is ready for use, an Init Function Call (Call init function of each driver parallel) 15 is performed for referring to a table standing on the inter-initialization dependency relation and generating a plurality of new kernel threads 15A for execution of a device driver as a parallel-processable init file function, and each of the kernel threads is executed.
Note that since these operations are synchronized with each other by a barrier 16, the operation will not go to any next step until all the kernel threads 15A have been executed.
Similarly to the above, when all the kernel threads are completely executed, an init Function Call (Call init function of each driver parallel) 17 is performed for generating a plurality of new kernel threads 17A and each of the kernel threads is executed, and these operations are synchronized with each other by a barrier 18. Also, when all the kernel threads are completely executed, an init Function Call (Call init function of each driver parallel) 19 is performed for generating a plurality of new kernel threads 19A and each of the kernel threads is executed, and these initializations are synchronized with each other by a barrier 20.
When all the I/O initializations for the device initialization are completed, various Initializations 21 that can be done after completion of the I/O initializations are done, and then a File System Mount 22 and Init File Execution (Exec/sbin/init) 9 are performed.
Alternatively, the I/O initializations may be done by normal parallelized operations when a user process has become usable after completion of the File System Mount and Init File Execution.
For starting up a plurality of computers, for example, the computers to be started up communicate with a computer having already been started up and are thus loaded with an OS. The OS is stored in place in a main storage, and then the control is passed to the OS. The OS having thus received the control prepare a necessary page table and stack in the main storage. Here, the startup is complete. The plurality of computers can thus be started up in parallel using a computer having already been started up, which leads to a reduction of the whole time for startup (also see the Japanese Published Unexampled Application No. 295289 of 1994 (pages 4 and 5, FIG. 6).
Also, in a system having a plurality of processors, as another example, a parent one of the processors is first started up and then it starts up the other ones, namely, child processors, in parallel. Thus, one of the processors, having completely been started up, can be used to start up the plurality of processors, which also leads to a reduction of the whole time for startup (also see the Japanese Published Unexampled Application No. 97465 of 1998 (pages 8–10, FIGS. 3 and 4).
In the aforementioned methods, the I/O initialization is done when the system has entered upon a specific phase as shown in a Table, indicated with a reference number 31, in FIG. 3 showing a hardware state at the OS startup, and a timing of the conventional I/O initialization.
Table 31 lists three initialization modes. The conventional I/O initialization has to be done in any one of three modes shown in Table 31. A “Sequential” mode is such that when no thread is usable (when a kernel B is being executed), the I/O initializations are done serially. A “Parallel” mode is such that when the thread is usable (a kernel C is being executed), the I/O initialization is divided into a plurality of steps whose number depends upon an inter-device dependency relation and the I/O initializations are done in parallel with each other in each of the steps. A “Lazy” mode is such that the I/O initializations are done after all the kernels are started up and a user process gets ready for execution.
In the “Sequential” mode for execution of the I/O initialization at the initial stage of the startup, devices are initialized serially. So, the wait time in the device initialization cannot effectively be utilized and thus the time for OS startup cannot be reduced.
Also, in the “Parallel” mode for execution of the I/O initialization at the middle stage of the startup, the I/O initialization is divided into a plurality of initializations (the number of initializations depends upon the inter-initialization dependency relation). Since the dependency relation limits the sequence in which the initializations are to be done in parallel, the initializations have to be synchronized with each other by a barrier, which will limit the granularity of initializations. Therefore, the wait time in the device initialization cannot fully be utilized and thus the time for OS startup cannot be reduced. Also, in this mode of initialization, no I/O initialization is done until a thread becomes usable. Namely, no device can be used before the thread is usable.
Further, in the “Lazy” mode, the I/O initialization is done after the user process becomes executable. Thus, the time for which the device is not usable is long. The “Lazy” mode is not suitable for use to start up a normal system which is controlled by one processor.